package com.ssy.lingxi.system.dao;

import com.ssy.lingxi.system.entity.MemberGrade;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MemberGradeRepository extends JpaRepository<MemberGrade, Long>, JpaSpecificationExecutor<MemberGrade> {
    List<MemberGrade> findByMemberGradeAndMemberGradeType(Integer memberGrade, Integer memberGradeType);

    MemberGrade findFirstByMemberGrade(Integer memberGrade);

    MemberGrade findFirstByMemberGradeAndIdNot(Integer memberGrade, Long id);
}
